package cur.nature.framework.mvc.auth;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 登录用户身份权限
 * 
 * @author ruoyi
 */
@Data
@Schema(description = "登录实体")
public class LoginUser implements Serializable
{
    private static final long serialVersionUID = 1L;

     @Schema(description =  "flag")
    private Boolean flag;
     @Schema(description =  "token")
    private String token;
     @Schema(description =  "授权菜单")
    private List<String> menuList;
     @Schema(description =  "用户信息")
    private User userInfo;
     @Schema(description =  "部门信息")
    private List<Dept> deptList;
     @Schema(description =  "角色信息")
    private List<Role> roleList;
     @Schema(description =  "资源信息")
    private List<Resource> resourceList;

    @Data
    @Schema(description = "用户信息 模型")
    public static class User implements Serializable{
        private static final long serialVersionUID = 2L;

         @Schema(description =  "邮件")
        private String email;
         @Schema(description =  "主键")
        private String id;
//         @Schema(description =  "证件号码")
//        private String idNo;
//         @Schema(description =  "证件类型")
//        private Integer idType;
//         @Schema(description =  "帐号名称")
//        private String loginName;
//         @Schema(description =  "帐号密码")
        private String loginPwd;
         @Schema(description =  "用户手机号码")
        private String mobile;
         @Schema(description =  "姓名")
        private String userName;
         @Schema(description =  "角色代码")
        private List<String> roles;
         @Schema(description =  "性别")
        private Integer sex;
        @Schema(description =  "头像")
        private String photo;
//         @Schema(description =  "公共唯一标识")
//        private String wxOpenId;
//         @Schema(description =  "会话密钥")
//        private String wxSessionKey;
//         @Schema(description =  "微信用户信息")
//        private String wxUserInfo;
    }

    @Data
    @Schema(description = "部门信息 模型")
    public static class Dept implements Serializable{
         @Schema(description =  "id")
        private Integer id;
         @Schema(description =  "父类角色id")
        private String parentId;
         @Schema(description =  "类型")
        private String type;
         @Schema(description =  " 角色名称")
        private String name;
    }

    @Data
    @Schema(description = "角色信息 模型")
    public static class Role implements Serializable{
         @Schema(description =  "id")
        private Integer id;
         @Schema(description =  "父类角色id")
        private String parentId;
         @Schema(description =  "类型")
        private String type;
         @Schema(description =  " 角色名称")
        private String name;
    }

    @Data
    @Schema(description = "资源信息 模型")
    public static class Resource implements Serializable{
         @Schema(description =  "id")
        private Integer id;
         @Schema(description =  "资源代码")
        private String code;
         @Schema(description =  "父类代码")
        private String parentId;
         @Schema(description =  "资源类型: menu-菜单,res-资源")
        private String type;
         @Schema(description =  "资源路径")
        private String path;
         @Schema(description =  "权限")
        private String auth;
         @Schema(description =  "名称")
        private String name;
    }


}
